package com.ruoyi.wechat.api;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.wechat.domain.Evaluate;
import com.ruoyi.wechat.domain.ScenicSpots;
import com.ruoyi.wechat.service.IScenicSpotsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "微信小程序API-周边景点管理",tags={"微信小程序API--周边景点管理"})
@RestController
@RequestMapping("/wechat/spots")
public class WxScenicSpotsController extends BaseController {

    @Autowired
    private IScenicSpotsService scenicSpotsService;

    @ApiOperation(value="添加景点")
    @Log(title = "微信接口-景点管理",businessType = BusinessType.INSERT)
    @PostMapping("/wxadd")
    public AjaxResult add(@RequestBody ScenicSpots spots)
    {
        return  toAjax(scenicSpotsService.insertScenicSpots(spots));
    }

}
